#ifndef M_MSG_H__
#define M_MSG_H__
#include "utils.hpp"
#include "levels.hpp"
#include <thread>
#include <memory>


namespace tclog{
    struct LogMsg{
        size_t _ctime;           //时间
        LogLevel::value _level; //⽇志等级
        size_t _line;          //⾏号
        std::thread::id _tid; //线程ID
        std::string _logger; //日志器名称
        std::string _file; //源码文件名
        std::string _payload;//有效消息
        


        LogMsg(const std::string &logger, 
            std::string file, 
            size_t line,
            std::string &&payload, 
            LogLevel::value level): 
            _logger(logger), 
            _file(file),
            _payload(std::move(payload)),
            _level(level),
            _line(line), 
            _ctime(util::Date::now()),
            _tid(std::this_thread::get_id()) {
        }
    };

}    
#endif